package com.jbit.examSystem.dao;

import com.jbit.examSystem.pojo.Student;
import com.jbit.examSystem.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.jbit.examSystem.pojo.StudentInfo;

import java.util.Date;
import java.util.List;

public interface StudentDao {
    void add(Student student);

    Student loginByNameAndPassword(@Param("name") String name,@Param("password") String password);

    StudentInfo getStudentByEmail(String email);

    Student checkEmail(String email);

    void setLoginTime(@Param("loginTime") Date loginTime,
                      @Param("id") Integer id,
                      @Param("lastLoginTime") Date lastLoginTime);

    void updateInfo(Student student);

    void updatePwd(User user);

    Student  getPwdByName(String name);

    Student selectById(Integer id);

    List<User> getAllStudent(@Param("userName") String userName);
}
